<template lang="html">
  <div class="item2">
    <ul class="wrapItem2">
      <li v-for="item of arr">
          <router-link to="/tour1">
            <texts :obj="item"></texts>
          </router-link>
      </li>
      <router-view></router-view>
    </ul>
  </div>

</template>
<script>
import texts from "../components/imgText.vue"
export default {
  components:{
    texts
  },
  data(){
    return{
      arr:{}
    }
  },
  created(){
    this.axios.get('http://txspring.cn:8080/getMu').then(data=>{
      let modules = data.data.data.modules;
      let datas = modules[0].hotdests;
      this.arr = datas;
    })
  }
}
</script>

<style lang="css">
.item2{
  width: 90%;
  margin: 0 auto;
}
.wrapItem2>li{
  width: 48%;
  float: left;
  /*margin-top: 0.4rem;*/
}
.wrapItem2>li:nth-of-type(2n+1){
  margin-right: 0.5rem;
}
.wrapItem2>li:last-child{
  margin-bottom: 8rem;
}
</style>
